package com.ihg.hiex.entity.session.participator;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.ihg.hiex.entity.session.Session;
import com.ihg.hiex.entity.user.Account;

/**
 * 会议主持人
 *
 * @author Ark
 *
 */
@Entity
@Table(name = "session_facilitator")
public class SessionFacilitator {

    @Id
    @GeneratedValue
    private Long id;
    
    /** 对应Session */
    @ManyToOne(fetch = FetchType.LAZY, optional = false)
    private Session session;
    
    /** 对应主讲师 */
    @ManyToOne(fetch = FetchType.LAZY, optional = false)
    private Account account;
    
    /** 姓名 */
    private String name;
    
    /** email */
    private String email;
    
    /** 手机号 */
    private String mobile;
    
    private Date createTime;
    
    @Column(name = "is_disabled")
    private boolean disabled;
    
    /**
     * The default constructor 
     */
    public SessionFacilitator() {
    }
    
    /**
     * @param session
     * @param account
     * @return
     */
    public SessionFacilitator initialize(Session session, Account account) {
        this.session = session;
        this.account = account;
        this.createTime = new Date();
        this.disabled = false;
        return this;
    }

    /**
     * @return the id
     */
    public Long getId() {
        return id;
    }

    /**
     * @return the session
     */
    public Session getSession() {
        return session;
    }

    /**
     * @return the account
     */
    public Account getAccount() {
        return account;
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @return the email
     */
    public String getEmail() {
        return email;
    }

    /**
     * @return the mobile
     */
    public String getMobile() {
        return mobile;
    }

    /**
     * @return the createTime
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * @return the disabled
     */
    public boolean isDisabled() {
        return disabled;
    }

    /**
     * @param id the id to set
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @param session the session to set
     */
    public void setSession(Session session) {
        this.session = session;
    }

    /**
     * @param account the account to set
     */
    public void setAccount(Account account) {
        this.account = account;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @param email the email to set
     */
    public void setEmail(String email) {
        this.email = email;
    }

    /**
     * @param mobile the mobile to set
     */
    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    /**
     * @param createTime the createTime to set
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * @param disabled the disabled to set
     */
    public void setDisabled(boolean disabled) {
        this.disabled = disabled;
    }

}